-
The proxy object for the current map style.
MGLStyle provides a set of convenience methods for changing Mapbox default styles using
-[MGLMapView styleURL]. Learn more about Mapbox default styles.It is also possible to directly manipulate the current map style via
-[MGLMapView style]by updating the style’s data sources or layers.See moreNote
Wait until the map style has finished loading before modifying a map’s style via any of theMGLStyleinstance methods below. You can use the-[MGLMapViewDelegate mapView:didFinishLoadingStyle:]or-[MGLMapViewDelegate mapViewDidFinishLoadingMap:]methods as indicators that it’s safe to modify the map’s style.Declaration
Objective-C
@interface MGLStyle : NSObjectSwift
class MGLStyle : NSObject
-
An
MGLStyleValueobject is a generic container for a style attribute value. The layout and paint attribute properties ofMGLStyleLayercan be set toMGLStyleValueobjects.The
MGLStyleValueclass itself represents a class cluster. Under the hood, a particularMGLStyleValueobject may be either anMGLConstantStyleValueto represent a constant value or one of the concrete subclasses ofMGLStyleFunctionto represent a value function. Do not initialize anMGLStyleValueobject directly; instead, use one of the class factory methods to create anMGLStyleValueobject.The
MGLStyleValueclass takes a generic parameterTthat indicates the Foundation class being wrapped by this class. Common values forTinclude:NSNumber(for Boolean values and floating-point numbers)NSValue(forCGVector,NSEdgeInsets,UIEdgeInsets, and enumerations)NSStringNSColororUIColorNSArray
Declaration
Objective-C
@interface MGLStyleValue <T> : NSObjectSwift
class MGLStyleValue<T> : NSObject where T : AnyObject
-
Declaration
Objective-C
@interface MGLLight : NSObjectSwift
class MGLLight : NSObject
Install in Dash
Styling the Map Reference